package com.guigu.auth.pojo;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;
import java.util.Set;

/**
 * @ClassName:UserJWT
 * @Description:自定义用户JWT对象, 继承springSecurity的User对象
 * @Author:taoLong
 * @Date:2021/12/7:16:27 星期二
 * @email:2391611102@qq.com or 2391611102qq@gmail.com
 */
public class UserJWT extends User {
    private String id;    //用户ID
    private String name;  //用户名字

    public UserJWT(String username, String password, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, authorities);
    }
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    @Override
    public String toString() {
        return "UserJWT{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                '}';
    }
}
